<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>演唱会运营后台</title>
    <script src="http://concertadmin.m.yy.com/concertadmin/js/jquery/jquery.min.js" type="text/javascript"></script>
    <script src="http://concertadmin.m.yy.com/concertadmin/js/commons/jquery-ext.js" type="text/javascript"></script>
    <script src="http://concertadmin.m.yy.com/concertadmin/js/commons/json.js" type="text/javascript"></script>
    <script src="http://concertadmin.m.yy.com/concertadmin/js/jquery/jquery.cookie.min.js"
            type="text/javascript"></script>
    <script type="text/javascript" src="http://concertadmin.m.yy.com/concertadmin/js/commons/login.js"></script>
    <script type="text/javascript"
            src="http://res.udb.duowan.com/lgn/js/oauth/udbsdk/pcweb/udb.sdk.pcweb.popup.min.js"></script>

    <style type="text/css">
        html {
            position: relative;
        }

        html, body {
            padding: 0;
            margin: 0;
            width: 100%;
            height: 90%;
            overflow: hidden;
        }

        .loginTip {
            width: 300px;
            height: 200px;
            border: 1px solid #000;
            text-align: center;
            background-color: #E0E0E0;
            font: normal 18px;
            color: red;
            margin-left: 40%;
            margin-top: 10%;
        }

        .operLink {
            text-decoration: underline;
        }

        .loginmsg {
            display: none;
        }
    </style>
</head>
<body>
<div class="loginTip">
    <span class="nologinmsg">请刷新页面登陆，或点击<a class="operLink" href="javascript:void(0)" onclick="showLoginBox();">登录</a>!</span>
    <span class="loginmsg">欢迎进入演唱会运营平台，<a class="operLink" href="javascript:void(0)" onclick="logout();">退出</a></span>
</div>
</body>
<script type="text/javascript">
    $(function () {
        loginCfg.loginCallBack = function () {
            checkLimit();
        };
        loginCfg.logoutCallBack = function () {
            window.location.reload();
        };
        if (isLogin() == false) {
            showLoginBox();
            return;
        } else {
            checkLimit();
        }

    });
    function checkLimit() {
        $.ajax({
            type: "GET",
            url: "/concertadmin/isAdmin.action",
            dataType: "text",
            success: function (msg) {
                if (msg && msg == "true") {
                    window.location.href = "/concertadmin/index.html";
                } else {
                    $(".nologinmsg").hide();
                    $(".loginmsg").show();
                    alert("对不起，您无权限登陆!");
                }
            }
        });
    }
</script>
</html>